package com.github.shiqiyue.app.modules.dbms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.shiqiyue.app.api.sapi.controller.dbms.req.DatabasePageReq;
import com.github.shiqiyue.app.modules.dbms.entity.Database;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 数据库 Mapper 接口
 * </p>
 *
 * @author wenyao.wur
 * @since 2019-08-06
 */
public interface DatabaseMapper extends BaseMapper<Database> {

    /***
     * 分页请求
     * @param page
     * @param databasePageReq
     * @return
     */
    IPage<Database> page(Page<Database> page, @Param("query") DatabasePageReq databasePageReq);

    /**
     * 通过id获取
     *
     * @param id
     * @return
     */
    Database getDetailById(Long id);
}
